export default `import { defineComponent, computed, reactive } from 'vue';
import type { PropType } from 'vue';
import type { PageStateType } from '@/<%= typePath.replace(/\\.ts$/, "") %>';

import * as httpMethods from '@/<%= apiPath.replace(/\\.[t|j]s$/, "") %>';
import { sleep } from '@/utils';

/**
 * 页面模板数据:
 * {
 *   "index": "<%= index %>",
 *   "pagePath": "<%= pagePath %>",
 *   "apiPath": "<%= apiPath %>",
 *   "typePath": "<%= typePath %>",
 *   "name": "<%= name %>",
 *   "business": "<%= business %>"
 * }
 */

/** <%= name %> */
export default defineComponent({
  props: {
    modelValue: {
      type: String as PropType<string>,
      default: () => '',
    },
    params: {
      type: Object as PropType<{ name: string }>,
      default: () => ({ name: '' }),
    },
  },
  emits: {
    "update:modelValue": (val: string) => {
      return true;
    },
  },
  setup(props, { attrs, emit, expose, slots }) {
    const pageState = reactive<PageStateType>({

    });

    const _value = computed({
      get() {
        return props.modelValue;
      },
      set(val: string) {
        emit('update:modelValue', val);
      },
    });
    
    return () => <div><%= name %>页面</div>;
  },
});
`;
